Philip Chang // iP PR#124
Open
philip1304 wants to merge 19 commits into
Open
Conversation
thomasjlalba
left a comment
There was a problem hiding this comment.
Just some formatting errors and some coding styles to follow for this course! Good work!
| String command = parts[0].toLowerCase(); | ||
| String details = parts.length > 1 ? parts[1] : ""; | ||
|
|
||
| switch (command) { |
There was a problem hiding this comment.
For your switch statements, you could follow the following style set by the couse in this link!
| } | ||
| catch (Exception e) { | ||
| } | ||
| System.out.println(""); |
There was a problem hiding this comment.
Maybe you couild indicate a meaningful message for exceptions thrown?
| catch (IllegalArgumentException ex) { | ||
| switch (dateString.toLowerCase()) { | ||
| case "today": | ||
| return now; |
There was a problem hiding this comment.
Do include break statements, and indicate if its an explicit fallthrough
| String[] parts = dateTimeString.split(" ", 2); | ||
|
|
||
| if (parts.length == 2) { | ||
| LocalDate date = parseDateString(parts[0]); |
There was a problem hiding this comment.
Maybe it would be good to refactor parts[0] to indicate what it means
| this.taskName = taskName; | ||
| this.type = TaskType.TODO; | ||
|
|
||
| //this.isDone = false; |
| public String getTypeIcon() { | ||
| switch (type) { | ||
| case TODO: | ||
| return "T"; |
There was a problem hiding this comment.
Maybe you can avoid magic strings and store the strings!
ip // Final JAR Release
Notes: - Added abstraction & documentation // Parser.java - Added abstraction & documentation, fixed errors that would cause the program to exit // PlopBot.java - Added documentation // Storage.java - Added documentation, cleaned up code // Task.java - Added documentation // TaskList.java - Added documentation // Ui.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
plopBot iP // PR